package collection;

import java.util.LinkedList;

/*
LinkedList集合功能：
 */
public class LinkedListDemo {
    public static void main(String[] args) {
        LinkedList<Integer>list=new LinkedList<>();
        list.add(100);
        list.add(200);
        list.add(500);
        list.add(600);
        System.out.println("list:"+list);

        int first=list.getFirst();
        int last=list.getLast();
        System.out.println("first:"+first+",last:"+last);

        list.removeFirst();
        System.out.println("list:"+list);
        list.getLast();
        System.out.println("list:"+list);
    }
}
